class TypeUtil {
  // 根据日期计算星期几
  static String? getWeekday(String value) {
    String? weekday;
    switch (DateTime.tryParse(value)!.weekday) {
      case 1:
        weekday = "周一";
        break;
      case 2:
        weekday = "周二";
        break;
      case 3:
        weekday = "周三";
        break;
      case 4:
        weekday = "周四";
        break;
      case 5:
        weekday = "周五";
        break;
      case 6:
        weekday = "周六";
        break;
      case 7:
        weekday = "周日";
        break;
      default:
    }
    return weekday;
  }
}
